<?$TYPE=fetch_a_string('type')?>
<{if 'urgent'==$TYPE }>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td><{$ware.brand}></td>
			<td><{$ware.specific}></td>
			<td><{$ware.unit}></td>
			<td style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" value='' size="5" class="decimal"
				onfocus="chkdig_int(this)" onblur="do_stuff_total()" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark_use[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{elseif 'addit'==$TYPE}>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td><{$ware.brand}></td>
			<td><{$ware.specific}></td>
			<td><{$ware.unit}></td>
			<td style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" value='' size="5" class="decimal"
				onfocus="chkdig_int(this)" onblur="do_stuff_total()" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark_use[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{elseif 'refill'==$TYPE}>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td><{$ware.brand}></td>
			<td><{$ware.specific}></td>
			<td><{$ware.unit}></td>
			<td><{$ware.amount}></td>
			<td><{$ware.cordon}></td>
			<td style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" value='<?=$ware.cordon>$ware.amount?$ware.cordon-$ware.amount:''?>' size="5" class="decimal"
				onfocus="chkdig_int(this)" onblur="do_stuff_total()" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark_use[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{elseif 'revertin'==$TYPE}><{// 退料入库 }>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td><{$ware.brand}></td>
			<td><{$ware.specific}></td>
			<td><{$ware.unit}></td>
			<td style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" size="5" class="decimal" onfocus="chkdig_int(this)" /></td>
			<td style="padding:0;"><input type="text" name="price[<{$ware.id}>]" value="<{$ware.price}>" size="5" class="decimal fnum" onfocus="chkdig_float(this)" /></td>
			<td><div id="ssum_<{$ware.id}>"></div></td>
			<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{elseif 'outbound'==$TYPE}><{// 出库 }>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td><{$ware.brand}></td>
			<td><{$ware.specific}></td>
			<td><{$ware.unit}></td>
			<td style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" size="5" class="decimal" onfocus="chkdig_int(this)" /> / <{$ware.amount}></td>
			<td style="padding:0;"><div id="sprice_<{$ware.id}>" class="decimal fnum"><{$ware.price}></div></td>
			<td><div id="ssum_<{$ware.id}>"></div></td>
			<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{elseif 'demand'==$TYPE}><{// 领料需求 }>
		<tr id="selstf_<{$ware.id}>">
			<td><{$ware.sno}>&nbsp;</td>
			<td><{$ware.name}>&nbsp;</td>
			<td><{$ware.brand}></td>
			<td><{$ware.specific}></td>
			<td><{$ware.unit}></td>
			<td style="padding:0;"><input type="text" name="amount[<{$ware.id}>]" size="5" class="decimal" onfocus="chkdig_int(this)" /> / <{$ware.amount}></td>
			<td style="padding:0;" width="120"><input type="text" name="add_sno[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td style="padding:0;" width="120"><input type="text" name="remark[<{$ware.id}>]" value='' size="8" style="width:98%;" /></td>
			<td><a href="javascript:;" onclick="$('#selstf_<{$ware.id}>').remove();do_stuff_total();">取消</a></td>
		</tr>
<{else}>
	<tr><td colspan="6">Undefined!</td></tr>
<{/if}>

<script>resize_fnum();</script>